/**
 * @author: 團長
 * @date: 2014-3-17-下午1:31:09
 */
package net.loyintean.pearlshell.basedb;

import net.loyintean.pearlshell.base.model.ResultData;
import net.loyintean.pearlshell.basedb.exception.TransactionException;

/** special interface for remove data from data base.
 * 
 * @author 團長
 * @since 2014-3-17
 * @version 1.0.0 */
public interface RemoveDBService<T> {

	/** remove rows from database.
	 * <p>
	 * although named as revmoe <strong>single</strong> dto, this method may
	 * remove several rows. that's dependes on the sql.
	 * 
	 * @author 團長
	 * @since 2014-3-18
	 * @param dto
	 *            status SUCCESS: everything is ok, and the getData() will
	 *            return the dao result.<br>
	 *            status FAIL: the rows or id returned by dao is not grater then
	 *            zero.
	 * @return how many rows are removed.
	 * @throws TransactionException */
	public ResultData<Integer> removeSingleDto(T dto)
			throws TransactionException;
}
